package com.ruoyi.fee.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fee.mapper.WCustomerSettlementModeMapper;
import com.ruoyi.fee.domain.WCustomerSettlementMode;
import com.ruoyi.fee.service.IWCustomerSettlementModeService;

/**
 * 客户结算方式Service业务层处理
 * 
 * @author wzy
 * @date 2024-08-30 14:32:52
 */
@Service
public class WCustomerSettlementModeServiceImpl implements IWCustomerSettlementModeService 
{
    @Autowired
    private WCustomerSettlementModeMapper wCustomerSettlementModeMapper;

    /**
     * 查询客户结算方式
     * 
     * @param customerSettlementModeId 客户结算方式主键
     * @return 客户结算方式
     */
    @Override
    public WCustomerSettlementMode selectWCustomerSettlementModeByCustomerSettlementModeId(Long customerSettlementModeId)
    {
        return wCustomerSettlementModeMapper.selectWCustomerSettlementModeByCustomerSettlementModeId(customerSettlementModeId);
    }

    /**
     * 查询客户结算方式列表
     * 
     * @param wCustomerSettlementMode 客户结算方式
     * @return 客户结算方式
     */
    @Override
    public List<WCustomerSettlementMode> selectWCustomerSettlementModeList(WCustomerSettlementMode wCustomerSettlementMode)
    {
        return wCustomerSettlementModeMapper.selectWCustomerSettlementModeList(wCustomerSettlementMode);
    }

    /**
     * 新增客户结算方式
     * 
     * @param wCustomerSettlementMode 客户结算方式
     * @return 结果
     */
    @Override
    public int insertWCustomerSettlementMode(WCustomerSettlementMode wCustomerSettlementMode)
    {
        wCustomerSettlementMode.setCreateTime(DateUtils.getNowDate());
        return wCustomerSettlementModeMapper.insertWCustomerSettlementMode(wCustomerSettlementMode);
    }

    /**
     * 修改客户结算方式
     * 
     * @param wCustomerSettlementMode 客户结算方式
     * @return 结果
     */
    @Override
    public int updateWCustomerSettlementMode(WCustomerSettlementMode wCustomerSettlementMode)
    {
        wCustomerSettlementMode.setUpdateTime(DateUtils.getNowDate());
        return wCustomerSettlementModeMapper.updateWCustomerSettlementMode(wCustomerSettlementMode);
    }

    /**
     * 批量删除客户结算方式
     * 
     * @param customerSettlementModeIds 需要删除的客户结算方式主键
     * @return 结果
     */
    @Override
    public int deleteWCustomerSettlementModeByCustomerSettlementModeIds(Long[] customerSettlementModeIds)
    {
        return wCustomerSettlementModeMapper.deleteWCustomerSettlementModeByCustomerSettlementModeIds(customerSettlementModeIds);
    }

    /**
     * 删除客户结算方式信息
     * 
     * @param customerSettlementModeId 客户结算方式主键
     * @return 结果
     */
    @Override
    public int deleteWCustomerSettlementModeByCustomerSettlementModeId(Long customerSettlementModeId)
    {
        return wCustomerSettlementModeMapper.deleteWCustomerSettlementModeByCustomerSettlementModeId(customerSettlementModeId);
    }

    /**
     * 查询客户结算方式
     *
     * @param customerName 客户结算方式主键
     * @return 客户结算方式
     */
    @Override
    public WCustomerSettlementMode selectWCustomerSettlementModeByCustomerName(String customerName)
    {
        return wCustomerSettlementModeMapper.selectWCustomerSettlementModeByCustomerName(customerName);
    }
}
